<?php
/**
 * 项目日志审核
 * User: guojing
 * Date: 2020/5/8
 * Time: 22:57
 */

namespace app\api\model;

use think\Model;

class ProjectLogCheckdetail extends Model
{

    protected $name = 'project_log_checkdetail';

    public static function findInfoByCondition($condition = [], $isLock = 0)
    {
        if ($isLock == 1) {
            return self::where($condition)->lock(true)->find();
        } else {
            return self::where($condition)->find();
        }
    }

    public static function addRecord($addData)
    {
        $data = $addData;
        $data['c_date'] = date('Ymd');
        $data['createtime'] = time();
        $data['updatetime'] = time();
        return self::create($data);
    }

}